package com.fulu.game.bi.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 分组关联表
 */
@Getter
@AllArgsConstructor
public enum ValueCategoryEnum {
    GIFT(1,"礼物"),
    TREASURE_CHEST(2,"宝箱"),
    GIFT_BOX(3,"礼盒"),
    ;

    private Integer type;
    private String name;

    public static ValueCategoryEnum getEnum(Integer type) {
        for(ValueCategoryEnum e :  ValueCategoryEnum.values()){
            if(Objects.equals(e.getType(),type)){
                return e;
            }
        }
        return null;
    }
}
